import request from '@/utils/request'

export function login(groupId, userName, userPass, compel) {
  return request({
    url: '/api/client/login',
    method: 'post',
    data: {
      account: userName,
      password: userPass,
      org_code: groupId,
      compel: compel
    }
  })
}

export function getInfo(token) {
  return request({
    url: '/api/user/user_info',
    method: 'get',
    params: { token }
  })
}

export function logout() {
  return request({
    url: '/api/client/logout',
    method: 'post'
  })
}

export function getLoginList() {
  return request({
    url: '/api/client/organization_login_list',
    method: 'get',
    data: {}
  })
}
